go fishing for an existing fish for the source/destination combination
authorØyvind Kolås <ok@src.gnome.org>
Mon, 12 Mar 2007 01:45:17 +0000 (01:45 +0000)
committerØyvind Kolås <ok@src.gnome.org>
Mon, 12 Mar 2007 01:45:17 +0000 (01:45 +0000)
* babl/babl-fish.c: (fishing_result_examine), (go_fishing),
(babl_fish): go fishing for an existing fish for the
source/destination combination before trying to create one.

svn path=/trunk/; revision=227

babl/babl-fish.c

index c01de2a9abf82ace3314c59798a846e7b32c9d75..5675ea8edf4e09640389786efc4305b4c76663b5 100644 (file)
@@ -78,9 +78,6 @@ fishing_result_examine (Babl *babl,
   return 0;  /* continue iterating */
 }
 
-static int yes=0;
-static int no=0;
-
 static Babl * 
 go_fishing (Babl    *source,
             Babl    *destination)
@@ -92,18 +89,7 @@ go_fishing (Babl    *source,
     data.destination = destination;
     data.ret = NULL;
 
-
     babl_db_each (db, fishing_result_examine, &data);
-
-    if (data.ret != NULL)
-      {
-        yes++;
-      }
-    else
-      {
-        no++;
-      }
-
     return data.ret;
   }
 }